Repository navigation
Add signed apt and dnf repositories for the Linux packages - #338
Merged
Merged
Conversation
The .deb and .rpm from the release page never updated. Stable releases now publish to apt and dnf repositories at pkg.lokalbot.com (Cloudflare R2), and once the repository key is committed the packages add them themselves (deb822 sources + keyring; yum .repo with gpgcheck and repo_gpgcheck + key), so apt upgrade and dnf upgrade bring later versions. - linux-repos.yml: called by release.yml for stable tags, or by hand for a published one. GitHub-hosted only; skips without the LINUX_REPO_* secrets (fails once the key is committed). Signs with rpmsign and gpg via scripts/linux-repos.sh, keeps the newest 3 versions, uploads with rclone in a cache-safe order and checks what the domain serves. - On pull requests, scripts/ci/check-linux-repos.sh packages the latest release's binaries with a throwaway key and checks install, upgrade, kept edits and refusal of tampered or unsigned files in Ubuntu 24.04, Debian 13 and Fedora containers. - Docs: Linux README, RELEASING.md (setup, expiry, rotation, leaks), READMEs and the system requirements page.
…tories on The README and website copy says the .deb and .rpm add the LokalBot repository, which is only true once its key is committed. It moves to its own pull request, merged with that key, so master never promises updates the current packages can't give.
…ran-ac50b7 # Conflicts: # LinuxWindows/scripts/package-linux-distros.sh # RELEASING.md
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
lokalbot | 04a021d | Commit Preview URL Branch Preview URL |
Oct 20 2026, 01:49 PM |
…f upgrade The release's own lokalbot package was always told to download and install the next package. Once a .deb or .rpm has added LokalBot's repository (/etc/apt/sources.list.d/lokalbot.sources, /etc/yum.repos.d/lokalbot.repo, not turned off with Enabled: no or enabled=0), package::owner() marks it as having a repository, so it routes to the package manager and is told "sudo apt upgrade" or "sudo dnf upgrade". The Arch package, and a .deb or .rpm from before the repository, keep the install command. The check reads the shipped repository files in its tests and runs off the UI thread with the package lookup.
stevyhacker
marked this pull request as ready for review
October 20, 2026 13:48
stevyhacker
enabled auto-merge
October 20, 2026 14:10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The Linux alpha will ship fixes often, but a
.debor.rpminstalled from the release page never updates. This adds signed apt and dnf repositories atpkg.lokalbot.com, published by the release, and has the.deband.rpmadd them the way Chrome's and VS Code's packages do. Install the downloaded file once, and after thatsudo apt upgradeorsudo dnf upgradebrings each stable release.Nothing goes live until the owner does the one-time setup below: the job skips without its secrets, and the packages add the repository only once its public key is committed.
Workflow (
.github/workflows/linux-repos.yml, called by a newlinux-reposjob inrelease.ymlfor stable tags only)readyjob skips with a notice when aLINUX_REPO_*secret is missing. It fails instead if the public key is already committed, because that release's packages point at the repository.publishdownloads the release's.deband.rpm, checks their.sha256and versions, imports the key, and checks that the key is in the committed keyring. It warns 180 days before the key expires. It then copies the published packages from R2 and runsLinuxWindows/scripts/linux-repos.sh. The signing key is deleted before the upload step.Cache-Control: no-cache), then deletion of pruned packages. Last, it checks thatpkg.lokalbot.comserves what was uploaded.gh workflow run linux-repos.yml -f tag=vX.Y.Zpublishes a release that is already out.LinuxWindows/scripts/linux-repos.shstable, componentmain, amd64, SHA-256 only). HasAcquire-By-Hash, so a cached index can't mismatch, plus a signedInReleaseandRelease.gpg.repomd.xml.asc. RPMs are signed withrpmsign.Packaging (
package-linux-distros.sh, +37 lines): oncepackaging/linux/lokalbot-archive-keyring.ascexists, the packages ship the repository files below. The Arch package is unchanged. The script also gains three env overrides, used only by the check..deb/etc/apt/sources.list.d/lokalbot.sources(deb822, conffile)/usr/share/keyrings/lokalbot-archive-keyring.gpg.rpm/etc/yum.repos.d/lokalbot.repo(%config(noreplace),gpgcheck=1,repo_gpgcheck=1,skip_if_unavailable=True)/etc/pki/rpm-gpg/RPM-GPG-KEY-lokalbotApp (
lokalbot-update/src/package.rs, on top of #335):package::owner(), already off the UI thread, also reads/etc/apt/sources.list.d/lokalbot.sources(dpkg) or/etc/yum.repos.d/lokalbot.repo(rpm). When the file is there and not turned off (Enabled: no/enabled=0), the release'slokalbotpackage routes to the package manager. It is then told "Update LokalBot with your package manager, for example sudo apt upgrade" (orsudo dnf upgrade), using #335's existing string, so no new translations are needed.Docs
RELEASING.md: a new "Linux package repositories" section covering setup, key expiry and rotation, a leaked key, and taking a version back.web/on merge. Docs: the .deb and .rpm add the LokalBot repository #339 covers the Linux README's install and update sections, both root READMEs and the system requirements page. It merges with the key commit (step 5).Validation
LinuxWindows/scripts/ci/check-linux-repos.shran on the Ubuntu box (own working directory; its containers, network and files removed afterwards). It packages v0.11.0's release binaries as 0.11.0–0.11.3 with a throwaway key. It serves the repository over HTTPS aspkg.lokalbot.comon a private Docker network, with a throwaway CA trusted in the clients. Then, in cleanubuntu:24.04,debian:13andfedora:latest(Fedora 44) containers:.deband.rpmmark the repository files as config files; the Arch package has none.apt update/apt upgradeanddnf upgradeto 0.11.1 with an edited repository file (kept, no.dpkg-dist/.rpmnew). Fedora shows the RPM signatureRSA/SHA256 … Key ID.InReleaseand a tamperedRelease(withInReleaseremoved) are refused by Ubuntu's gpgv (BADSIG) and Debian 13's sqv ("Message has been manipulated"). A tamperedrepomd.xmlis refused by dnf ("Bad PGP signature")..deb(apt: unexpected size), a swapped.rpm(dnf: checksum doesn't match) and an unsigned.rpmbehind signed metadata (dnf: "The package is not signed") are refused, and the installed version stays 0.11.1. After restoring, all three upgrade to 0.11.3.Transcript (
NFPM=… scripts/ci/check-linux-repos.sh release/LokalBot-0.11.0-linux-x86_64; gpgv lines and dependency installs trimmed)Also:
cargo clippy -p lokalbot-update -p lokalbot-app --all-targets --locked -- -D warningsis clean, andcargo test -p lokalbot-update -p lokalbot-app --lockedpasses (37 and 51 tests). The new tests:package::tests::release_packages_with_the_repository_file_update_from_itreads the shippedlokalbot.sources/lokalbot.repo. It covers turned-off files, the other manager's file and the Arch package.updates::tests::release_packages_with_the_repository_are_told_to_upgrade.cargo fmt --all -- --checkandpython3 scripts/sync-localizations.py --check: clean.actionlint1.7.12 onlinux-repos.ymlandrelease.yml: clean.shellcheck -S warningon both new scripts: clean.python3 Scripts/render_web.py --check(on Docs: the .deb and .rpm add the LokalBot repository #339's copy): up to date.Not verified: the real R2 upload and
pkg.lokalbot.com, because the bucket, token and key don't exist yet. The firstgh workflow run linux-repos.yml -f tag=v0.11.0after setup is that test, and its last step compares what the domain serves.Changed test expectations
None.
Owner's one-time steps
Full commands are in RELEASING.md, "Linux package repositories → One-time setup".
$GNUPGHOME/openpgp-revocs.d/$FPR.revin 1Password, then runrm -rf "$GNUPGHOME". Don't commit the.ascyet (step 5).lokalbot-packages.pkg.lokalbot.com. Cloudflare adds the DNS record. Leaver2.devoff.Cache-Control.gh secret setforLINUX_REPO_R2_ACCOUNT_ID,LINUX_REPO_R2_ACCESS_KEY_IDandLINUX_REPO_R2_SECRET_ACCESS_KEY.gh workflow run linux-repos.yml -f tag=v0.11.0, thencurl -fsS https://pkg.lokalbot.com/apt/dists/stable/InRelease. 0.11.0's packages don't add the repository, so nobody depends on it yet.lokalbot-archive-keyring.ascinto Docs: the .deb and .rpm add the LokalBot repository #339 (or ask me to, with the file), and merge Docs: the .deb and .rpm add the LokalBot repository #339. The next release's.deband.rpmadd the repository. From then on, a missing secret fails the release'slinux-reposjob.Merging this PR publishes nothing and changes no installed package until steps 1–5 are done. Step 5 merges #339 with the key.
Risk / rollout notes
.deb/.rpmcounts as "from the release" (told to install the downloaded package) only while it has no enabled repository file. The 0.11.0 installs, the Arch package and anyone who setsEnabled: no/enabled=0keep the install command.metadata_expire=6h(dnf upgrade --refreshsooner). apt sees it on the nextapt update. The firstdnf upgradeasks to import the key, the standard dnf prompt for a third-party repository. dnf5 asks twice: once for the signed metadata, once for the packages./etc/yum.repos.d, so the.rpmthere still only gets the in-app notice. The docs say so. Adding/etc/zypp/repos.d/lokalbot.repowould be a small follow-up.release.yml; this job sits beforelinux-windows-publish, so no hunk overlaps.package-linux-distros.shchanges are small and self-contained: header, the two variables at the top, oneifblock after the icons, and the finalrm.by-hash/andrpm/repodata/keep older indexes (a few KB per release), so a client or cache holding the previous index still finds its files. Everything else in the bucket that the job didn't produce is deleted.